import { Input } from 'antd';
import { history } from 'umi';
import styles from './index.less';

const { Search } = Input;

const onSearch = (value) => {
  history.push(`/detail2?key=${value}`);
};

const Searchs = () => (
  <div className={styles.searchContainer}>
    <Search
      placeholder="请输入区块哈希、区块高度进行搜索"
      onSearch={onSearch}
      className={styles.search}
    />
  </div>
);

export default Searchs;
